using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder;
using Microsoft.Practices.EnterpriseLibrary.Common.Configuration;

namespace Microsoft.ApplicationBlocks.Updater.Configuration
{
    internal class DownloaderProviderDataRetriever : IConfigurationNameMapper
    {
        public string MapName(string name, IConfigurationSource configurationSource)
        {
            if (name != null)
                return name;

            return new UpdaterConfigurationView(configurationSource).DefaultDownloaderName;
        }
    }
}
